package com.hugedata.cdn.startup;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.hugedata.cdn.util.CdnException;
import com.hugedata.cdn.util.CommonUtil;

/**
 * 
 * 项目名称：cdn 类名称：SystemInitLoader 类描述： 创建人：zhaoaihua 创建时间�?013-3-25 下午2:16:17
 * 修改备注�?
 * 
 * @version
 * 
 */
public class SystemInitLoader
{

    private CommonUtil commonutil;


    protected final Log log = LogFactory.getLog(getClass());

    /**
     * 系统初始化方法
     * 
     * @throws InterruptedException
     *             初始化线程终止异常
     */
    public void init() throws InterruptedException
    {

        try
        {

            // 静态数据加载
            commonutil.init();

        }
        catch (CdnException e)
        {
            log.error(
                    "ret = " + e.getErrorNum() + "-- "
                            + e.getMsgContent(), e);
            System.exit(0);

        }
    }

    /**
     * 系统销毁方法
     */
    public void destory()
    {

        // to do

    }

    public void setCommonutil(CommonUtil commonutil)
    {
        this.commonutil = commonutil;
    }
    
}
